<?php defined('IN_XFRAME') OR exit('permission denied');?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{$title}</title>
<style type="text/css">
	.box {
		padding: 10px;
		font-size: 12px;
		margin: 10px 5px;
		background: #EDEDED;
		width: 900px;
		margin: 10px auto;
	}
</style>
</head>
<body>

<div class="box" php-show="$title">{$title}</div>

<div class="box"><pre><?php print_r($var1); ?></pre></div>
<div class="box"><pre><?php print_r($var2); ?></pre></div>

<div class="box" php-hide="$title">如果title的值为空, 则可以显示这条消息, 否则不显示</div>

<div class="box" php-if="$list">
    <span>$list 不为空</span>
</div>

<div class="box" php-show="$list">
    <span>foreach by $list as $item</span>
    <ul>
        <li php-foreach="$list as $item">name:{$item.name} -- email: {$item.email}</li>
    </ul>
</div>

<div class="box" php-show="$list">
    <span>repeat by $list as $item</span>
    <ul>
        <li php-repeat="$list as $item">name:{$item.name} -- email: {$item.email}</li>
    </ul>
</div>

<div class="box" php-if="$list">
    <span>foreach by $list as $key => $item</span>
    <ul>
        <li php-foreach="$list as $key => $item">{$key} -- name:{$item.name} -- email: {$item.email}</li>
    </ul>
</div>

<div class="box">
    <span>foreach by [1,2,3,4,5]</span>
    <ul>
        <li php-foreach="[1,2,3,4,5] as $i">foreach {$i}</li>
    </ul>
</div>

<div class="box">
    <span>repeat by [1,2,3,4,5]</span>
    <ul>
        <li php-repeat="[1,2,3,4,5] as $i">foreach {$i}</li>
    </ul>
</div>

<div class="box">
    <span>for by ($i = 1; $i <= 5; $i++;)</span>
    <ul>
        <li php-for="$i = 1; $i <= 5; $i++">for {$i}</li>
    </ul>
</div>

</body>
</html>